package com.juanable.niubility.exception;

import com.juanable.niubility.enums.ResCodeEnum;
import lombok.Data;

/**
 * @author admin
 */
@Data
public class LimitException extends RuntimeException{
    private static final long serialVersionUID = 6610083281801529147L;

    public LimitException(String message) {
        super(message);
        this.code = ResCodeEnum.CODE_OPT_CODE_OPT_FREQUENT.getValue();
    }

    public LimitException() {
        super(ResCodeEnum.CODE_OPT_CODE_OPT_FREQUENT.getMsg());
        this.code = ResCodeEnum.CODE_OPT_CODE_OPT_FREQUENT.getValue();
    }

    int code;
}
